﻿Public Class consultas

    Dim ad As AccesoDatos
    Dim query As String

    '--------Insert

    Public Function InsertJuez(ByRef juez As Juez) As Integer
        query = "insert into juez (nombre, apellido, nro_documento, tipo_documento, fecha_nacimiento) values ('"
        query += juez.nombreInfo() & "','" & juez.apellidoInfo() & "'," & juez.nroDocInfo() & ",'"
        query += juez.tipoDocInfo & "','" & juez.fechaNacInfo() & "');"

        ad.consultaNonQuery(query)

        Return 1
    End Function

    Public Function InsertClub() As Integer

    End Function

    Public Function InsertSocio() As Integer

    End Function

    Public Function InsertProducto() As Integer

    End Function

    '-----------Update

    Public Function ModificarJuez() As Integer

    End Function

    Public Function ModificarClub() As Integer

    End Function

    Public Function ModificarSocio() As Integer

    End Function

    Public Function ModificarProducto() As Integer

    End Function

    '-----------Delette

    Public Function EliminarJuez() As Integer

    End Function

    Public Function EliminarClub() As Integer

    End Function

    Public Function EliminarSocio() As Integer

    End Function

    Public Function EliminarProducto() As Integer

    End Function

    '-----------Consulta

    Public Function SelectJuez(ByVal nom As String) As Data.DataTable
        query = "select * from juez where nombre = '" & nom & "'"
        Dim tabla As Data.DataTable = ad.consultaReader(query)
        Return tabla
    End Function

    Public Function SelectClub() As Integer

    End Function

    Public Function SelectSocio() As Integer

    End Function

    Public Function SelectProducto() As Integer

    End Function
End Class
